/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUInemeanshop;

import components.NButton;
import components.NKeyListener;
import components.NLabel;
import components.NPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

/**
 *
 * @author havardaxelsen
 */
public class GUILogin extends NPanel{

    private Image           img         = new ImageIcon("src/GUInemeanshop/img/logoKiosk.png").getImage();
    private NLabel          tekst       = new NLabel("Scan din strekkode for å logge inn. Trykk ESC for å logge inn med brukernavn og passord");
    private BorderLayout    bl          = new BorderLayout();
    private NKeyListener    kl          = new NKeyListener();
    private NButton         exit        = new NButton("X", kl);
    private JPanel          panelBg;
    
    public GUILogin() 
    {
        this.setLayout(bl);
        this.setBackground(Color.WHITE);
        exit.setBackground(Color.WHITE);
        exit.setBorderPainted(false);
        
        panelBg = new JPanel() 
        {
            
            @Override
            public void paintComponent(Graphics g) 
            {
                g.drawImage(img,200,70,null);
            }
        };
        
        tekst.setForeground(Color.gray);
        panelBg.add(tekst);
        
        add(panelBg,    BorderLayout.CENTER);
        add(exit,       BorderLayout.NORTH);
    }
}




